# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Stéphane Gaudreault <stephane@archlinux.org>
# Contributor: Thomas Dziedzic < gostrc at gmail >
# Contributor: Angel 'angvp' Velasquez <angvp[at]archlinux.com.ve>  
# Contributor: Peter Garceau <RockyChimp@gmail.com>

pkgname=python-sympy
pkgver=1.11.1
pkgrel=2
arch=('any')
pkgdesc='Symbolic manipulation package (Computer Algebra System), written in pure Python'
url='https://sympy.org/en/index.html'
license=('BSD')
depends=('python-mpmath')
optdepends=('ipython: user friendly interface for isympy'
            'python-symengine: optimized backend, set USE_SYMENGINE=1 to use')
makedepends=('python-setuptools')
source=("https://github.com/sympy/sympy/archive/sympy-$pkgver/sympy-$pkgver.tar.gz")
sha512sums=('6cc720b673cf31a2e8f56a5cae24ec15024ea43dee92196adb0a87f28561b5d2404fbbfd3d55a8414930a31d4d0f4a731d458ad528c8cbb03c37555f5c14ce4a')

build() {
  cd sympy-sympy-$pkgver
  python setup.py build
}

check() {
  cd sympy-sympy-$pkgver
  python bin/test
}

package() {
  cd sympy-sympy-$pkgver

  python setup.py install --root "$pkgdir" --optimize=1

  install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
